<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Info API | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'info-api.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/info-api.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/info-api.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/info-api.html" rel="nofollow" target="_blank">../en/info-api.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="rest-apis.html">REST APIs</a></span>
»
<span class="breadcrumb-node">Info API</span>
</div>
<div class="navheader">
<span class="prev">
<a href="simulate-pipeline-api.html">« Simulate pipeline API</a>
</span>
<span class="next">
<a href="licensing-apis.html">Licensing APIs »</a>
</span>
</div>
<div class="chapter xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="info-api"></a>Info API<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/rest-api/info.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>
<p>Provides general information about the installed X-Pack features.</p>
<h3>
<a id="info-api-request"></a>Request<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/rest-api/info.asciidoc">edit</a>
</h3>
<p><code class="literal">GET /_xpack</code></p>
<h3>
<a id="info-api-desc"></a>Description<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/rest-api/info.asciidoc">edit</a>
</h3>
<p>The information provided by this API includes:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
Build Information - including the build number and timestamp.
</li>
<li class="listitem">
License Information - basic information about the currently installed license.
</li>
<li class="listitem">
Features Information - The features that are currently enabled and available
under the current license.
</li>
</ul>
</div>
<h3>
<a id="info-api-path-params"></a>Path parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/rest-api/info.asciidoc">edit</a>
</h3>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">categories</code>
</span>
</dt>
<dd>
(Optional, list) A comma-separated list of the information categories to
include in the response. For example, <code class="literal">build,license,features</code>.
</dd>
<dt>
<span class="term">
<code class="literal">human</code>
</span>
</dt>
<dd>
(Optional, boolean) Defines whether additional human-readable information is
included in the response. In particular, it adds descriptions and a tag line.
The default value is <code class="literal">true</code>.
</dd>
</dl>
</div>
<h3>
<a id="info-api-example"></a>Examples<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/rest-api/info.asciidoc">edit</a>
</h3>
<p>The following example queries the info API:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_xpack</pre>
</div>
<div class="console_widget" data-snippet="snippets/1784.console"></div>
<p>Example response:</p>
<div class="pre_wrapper lang-console-result">
<pre class="programlisting prettyprint lang-console-result">{
   "build" : {
      "hash" : "2798b1a3ce779b3611bb53a0082d4d741e4d3168",
      "date" : "2015-04-07T13:34:42Z"
   },
   "license" : {
      "uid" : "893361dc-9749-4997-93cb-xxx",
      "type" : "trial",
      "mode" : "trial",
      "status" : "active",
      "expiry_date_in_millis" : 1542665112332
   },
   "features" : {
      "ccr" : {
        "available" : true,
        "enabled" : true
      },
      "analytics" : {
          "available" : true,
          "enabled" : true
      },
      "enrich" : {
          "available" : true,
          "enabled" : true
      },
      "flattened" : {
         "available" : true,
         "enabled" : true
      },
      "frozen_indices" : {
         "available" : true,
         "enabled" : true
      },
      "graph" : {
         "available" : true,
         "enabled" : true
      },
      "ilm" : {
         "available" : true,
         "enabled" : true
      },
      "logstash" : {
         "available" : true,
         "enabled" : true
      },
      "ml" : {
         "available" : true,
         "enabled" : true,
         "native_code_info" : {
           "version" : "7.0.0-alpha1-SNAPSHOT",
           "build_hash" : "99a07c016d5a73"
        }
      },
      "monitoring" : {
         "available" : true,
         "enabled" : true
      },
      "rollup": {
         "available": true,
         "enabled": true
      },
      "security" : {
         "available" : true,
         "enabled" : false
      },
      "slm" : {
         "available" : true,
         "enabled" : true
      },
      "spatial" : {
         "available" : true,
         "enabled" : true
      },
      "eql" : {
         "available" : true,
         "enabled" : true
      },
      "sql" : {
         "available" : true,
         "enabled" : true
      },
      "transform" : {
         "available" : true,
         "enabled" : true
      },
      "vectors" : {
         "available" : true,
         "enabled" : true
      },
      "voting_only" : {
         "available" : true,
         "enabled" : true
      },
      "watcher" : {
         "available" : true,
         "enabled" : true
      }
   },
   "tagline" : "You know, for X"
}</pre>
</div>
<p>The following example only returns the build and features information:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_xpack?categories=build,features</pre>
</div>
<div class="console_widget" data-snippet="snippets/1785.console"></div>
<p>The following example removes the descriptions from the response:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_xpack?human=false</pre>
</div>
<div class="console_widget" data-snippet="snippets/1786.console"></div>
</div>
<div class="navfooter">
<span class="prev">
<a href="simulate-pipeline-api.html">« Simulate pipeline API</a>
</span>
<span class="next">
<a href="licensing-apis.html">Licensing APIs »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>